import request from "../utils/request";

export function getAqis(page = 1, pageSize = 15, districtId = -1) {
  return request.get('/aqis', {
    params: {page, pageSize, districtId}
  })
}

export function getAqi(id) {
  return request.get('/aqis/' + id);
}

export function addAqi(aqi) {
  return request.post('/aqis', aqi);
}

export function deleteAqi(id) {
  return request.delete('/aqis', {
    params: {id}
  })
}

export function updateAqi(aqi) {
  return request.patch('/aqis', aqi);
}
